package com.ihelp.rest.mis.platform.dao;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.ihelp.rest.base.hibernate4.BaseHibernateDao;
import com.ihelp.rest.mis.pojo.Module;

@Repository
public class ModuleDao extends BaseHibernateDao<Module, String>{

	public List<Module> queryModules(){
		return this.list("from Module a where a.status=? order by a.orderCode", 1);
	}
	
	public List<Module> queryParentModules(){
		return this.list("from Module a where a.puuid='1' order by a.orderCode");
	}
	
	public List<Module> queryModules(String moduleArr){
		return this.list("from Module a where a.uuid in ("+ moduleArr + ")");
	} 
}
